export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: '映客', htmlAttrs: {
    // title: '飞猫', htmlAttrs: {
      lang: 'zh-cn'
    }, meta: [{
      charset: 'utf-8'
    }, {
      name: 'viewport', content: 'width=device-width, initial-scale=1'
    }, {
      hid: 'description', name: 'description', content: ''
    }, {
      name: 'format-detection', content: 'telephone=no'
    }], link: [{
      // rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'
      rel: 'icon', type: 'image/x-icon', href: 'https://img.ikstatic.cn/MTYyODc1ODAxNzI2OCM5MTEjcG5n.png'
    }]
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: ['element-ui/lib/theme-chalk/index.css', '~assets/css/normailze.css'],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [{
    src: '~plugins/ElementUI', ssr: true,
  },{ src: '@/plugins/vue-mavon-editor', ssr: false }
    // , {
    //   src: '@/plugins/mock', ssr: true
    // }
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: ['@nuxtjs/axios', '@gauseen/nuxt-proxy'], /*
   ** Axios module configuration
   */
  axios: {
    // See https://github.com/nuxt-community/axios-module#options
    // baseURL: process.env.apiUrl, // 代理请求域名
    // https: true, // 开启https
    prefix: '/app/', // 给路径加个前缀
    proxy: true, // Can be also an object with default options
    credentials: true, // 表示跨域请求时候是否需要携带凭证
    // proxyHeaders: false,
    // credentials: false,
    retry: {retries: 3}, // 超时重试3次
    progress: false, // 请求的时候是否加载loading页面
    debug: false // 开启调试，线上关闭
  }, proxy: {
    '/app/': {
      // target: process.env.VUE_APP_API_URL, // 目标接口域名
      // target: 'http://8.130.17.56:8091'|| process.env.VUE_APP_API_URL, // || process.env.VUE_APP_API_URL 目标接口域名
      target: 'http://localhost:8091'|| process.env.VUE_APP_API_URL, // || process.env.VUE_APP_API_URL 目标接口域名
      changeOrigin: true, // 是否跨域
      pathRewrite: {'^/app/': ''} // 把/app 替换成 /
    }
  }, // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {}, vendor: ['element-ui', 'axios'] //防止element-ui被打包多次
}
